﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="Prototype.list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
     <p>
    Welcome to the List page for this prototype Web 2.0 site.&nbsp; This is the home 
        page, and from the grid below you select the Artist you are interested in and 
        can click to see their related showreel images.</p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" 
            DataSourceID="myPrototypeDB" DataKeyNames="ID">
            <Columns>
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" >
                <HeaderStyle CssClass="gridheader" />
                </asp:BoundField>
                <asp:BoundField DataField="Firstname" HeaderText="Firstname" 
                    SortExpression="Firstname" >
                <HeaderStyle CssClass="gridheader" />
                </asp:BoundField>
                <asp:BoundField DataField="Surname" HeaderText="Surname" 
                    SortExpression="Surname" >
                <HeaderStyle CssClass="gridheader" />
                </asp:BoundField>
                <asp:BoundField DataField="Nickname" HeaderText="Nickname" 
                    SortExpression="Nickname" >
                <HeaderStyle CssClass="gridheader" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="Email" DataTextField="Email" 
                    DataTextFormatString="&lt;a href=mailto:{0}&gt;{0}&lt;/a&gt;" 
                    HeaderText="Email" SortExpression="Email">
                <HeaderStyle CssClass="gridheader" />
                </asp:HyperLinkField>
                <asp:HyperLinkField DataNavigateUrlFields="WebURL" 
                    DataNavigateUrlFormatString="{0}" DataTextField="WebURL" HeaderText="Web Site" SortExpression="WebURL">
                <HeaderStyle CssClass="gridheader" />
                </asp:HyperLinkField>
                <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" 
                    InsertVisible="False" ReadOnly="True" Visible="False" >
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="details2.aspx?ArtistId={0}" 
                    HeaderText="More Details"   Text="Select">  <%-- there is no sort on this as all the words are the same --%>
                <HeaderStyle CssClass="gridheader" />
                </asp:HyperLinkField>
                <asp:ImageField DataImageUrlField="Logo" HeaderText="Logo Thumbnail" 
                    NullImageUrl="~/Images/talklogo.jpg">
                    <%-- looks like a thumbnail via constrained image size, otherwise have an overflow problem if using CSS, but do not want to crop as
                    then it would not be a thumbnail --%>
                    <ControlStyle Height="50px" Width="50px" />    
                    <HeaderStyle CssClass="gridheader" />
                    <ItemStyle Wrap="False" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="myPrototypeDB" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myPrototypeDatabase %>" 
            ProviderName="<%$ ConnectionStrings:myPrototypeDatabase.ProviderName %>" 
            
            SelectCommand="SELECT [Title], [Firstname], [Surname], [Nickname], [Email], [WebURL], [ID], [Logo] FROM [Artists]">
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
     <p>
         <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/ArtistFeed.aspx">RSS feed for 3D Talk prototype</asp:HyperLink>
    </p>
     <p>
         &nbsp;</p>
     <p>
    </p>
     <p>
         &nbsp;</p>
     <p>
    </p>
    <p>
    </p>
</asp:Content>
